<?php

namespace ApiWF\Controller;

use Common\Controller\ApibaseController;

class SystemController extends ApibaseController
{

    public function config()
    {
        $appConfig = C('APP_CONFIG');
        $this->jsonReturn($appConfig, '启动页及系统配置信息');
    }


    public function advertisement()
    {

        //首页广告
        $banner = D('Slide')->where(['slide_cid' => 3, 'slide_status' => 1])->order('listorder desc')->find();
        if (empty($banner)) {
            $this->error();
        }
        $banner['slide_pic'] = qiniu_mirror_image_url($banner['slide_pic']);
        $this->jsonReturn2($banner);

    }


}


